Node* reversePart(Node* head, int L, int R) {
    // 在下面完成代码
    Node* pHead = new Node;
    pHead->next = head;
    Node* prevNode = pHead;
    for (int i = 0; i < L - 1; i++) // 找到左结点的前一个
    {
        prevNode = prevNode->next;
    }
    Node* cur = prevNode->next;
    for (int i = 0; i < R - L; ++i) // R - L 次头插
    {
        Node* nextNode = cur->next;
        cur->next = nextNode->next;
        nextNode->next = prevNode->next;
        prevNode->next = nextNode;
    }
    Node* list = pHead->next;
    free(pHead);
    return list;
}